﻿/*
 * Implementacja notyfikacji na podstawie "Custom soft key Notifications" by Christopher Fairbairn http://www.christec.co.nz/blog/archives/150
 */

using System;

namespace PocketGPW
{
    // NOTIF_SOFTKEY_FLAGS_xxx
    public enum NotificationSoftKeyType : uint
    {
        /// <summary>
        /// Remove the notification when the softkey is pressed
        /// </summary>
        Dismiss = 0x0000,

        /// <summary>
        ///  Hide the notification when the softkey is pressed (but do not dismiss)
        /// </summary>
        Hide = 0x0001,

        /// <summary>
        /// Do not dismiss or hide the notification when the softkey is pressed.
        /// </summary>
        StayOpen = 0x0002,

        /// <summary>
        /// Submit the HTML form in the associated notification instead of sending WM_COMMAND to the sink
        /// </summary>
        Submit = 0x0004,

        /// <summary>
        /// This softkey is disabled
        /// </summary>
        Disabled = 0x0008
    }

    public class NotificationSoftKey
    {
        private string _title;
        private NotificationSoftKeyType _type;

        public string Title
        {
            get { return _title; }
        }

        public NotificationSoftKeyType Type
        {
            get { return _type; }
        }

        public NotificationSoftKey(NotificationSoftKeyType type)
            : this(type, " ")
        {
        }

        public NotificationSoftKey(NotificationSoftKeyType type, String title)
        {
            _title = title;
            _type = type;
        }        
    }
}
